package com.tsmti.lab.entity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.util.Date;
import java.util.Objects;

/**
 * @auther ShiYan.Shi
 * @create 2018/11/17   13:41
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PIMS_PATHOLOGY_PARAFFIN", schema = "PIMS", catalog = "")
@Where(clause = "delFlag = 0")
public class PimsPathologyParaffin {
    /**
     * 蜡块id
     */
    private Long id;
    /**
     * 标本id
     */
    private Long parSampleId;
    /**
     * 病理编号
     */
    private String parPathologyCode;
    /**
     * 材块id
     */
    private Long parPieceid;
    /**
     * 蜡块名称
     */
    private String parName;
    /**
     * 蜡块序号
     */
    private Long parParaffinNo;
    /**
     * 蜡块标签
     */
    private String parParaffinCode;
    /**
     * 材块块数
     */
    private Long parpPeceCount;
    /**
     * 取白片数量
     */
    private Long parNullSlideNum;
    /**
     * 取材部位
     */
    private String parPieceParts;
    /**
     * 是否已经切片
     */
    private Long parIsSectioned;
    /**
     * 切片医生id
     */
    private Long parSectionedDoctorid;
    /**
     * 切片医生姓名
     */
    private String parSectionedDoctor;
    /**
     * 切片时间
     */
    private Date parSectionedTime;
    /**
     * 是否已打印标签
     */
    private Long parisprintlabel;
    /**
     * 标签打印人员id
     */
    private Long parPrintUserId;
    /**
     * 标签打印人员姓名
     */
    private String parPrintUser;
    /**
     * 标签打印时间
     */
    private Date parPrintTime;


    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PATHOLOGY_PARAFFIN")
    @SequenceGenerator(name = "SEQ_PATHOLOGY_PARAFFIN", sequenceName = "SEQ_PATHOLOGY_PARAFFIN", allocationSize = 1)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "PARSAMPLEID")
    public Long getParSampleId() {
        return parSampleId;
    }

    public void setParSampleId(Long parSampleId) {
        this.parSampleId = parSampleId;
    }

    @Basic
    @Column(name = "PARPATHOLOGYCODE")
    public String getParPathologyCode() {
        return parPathologyCode;
    }

    public void setParPathologyCode(String parPathologyCode) {
        this.parPathologyCode = parPathologyCode;
    }

    @Basic
    @Column(name = "PARPIECEID")
    public Long getParPieceid() {
        return parPieceid;
    }

    public void setParPieceid(Long parPieceid) {
        this.parPieceid = parPieceid;
    }

    @Basic
    @Column(name = "PARNAME")
    public String getParName() {
        return parName;
    }

    public void setParName(String parName) {
        this.parName = parName;
    }

    @Basic
    @Column(name = "PARPARAFFINNO")
    public Long getParParaffinNo() {
        return parParaffinNo;
    }

    public void setParParaffinNo(Long parParaffinNo) {
        this.parParaffinNo = parParaffinNo;
    }

    @Basic
    @Column(name = "PARPARAFFINCODE")
    public String getParParaffinCode() {
        return parParaffinCode;
    }

    public void setParParaffinCode(String parParaffinCode) {
        this.parParaffinCode = parParaffinCode;
    }

    @Basic
    @Column(name = "PARPIECECOUNT")
    public Long getParpPeceCount() {
        return parpPeceCount;
    }

    public void setParpPeceCount(Long parpPeceCount) {
        this.parpPeceCount = parpPeceCount;
    }

    @Basic
    @Column(name = "PARNULLSLIDENUM")
    public Long getParNullSlideNum() {
        return parNullSlideNum;
    }

    public void setParNullSlideNum(Long parNullSlideNum) {
        this.parNullSlideNum = parNullSlideNum;
    }

    @Basic
    @Column(name = "PARPIECEPARTS")
    public String getParPieceParts() {
        return parPieceParts;
    }

    public void setParPieceParts(String parPieceParts) {
        this.parPieceParts = parPieceParts;
    }

    @Basic
    @Column(name = "PARISSECTIONED")
    public Long getParIsSectioned() {
        return parIsSectioned;
    }

    public void setParIsSectioned(Long parIsSectioned) {
        this.parIsSectioned = parIsSectioned;
    }

    @Basic
    @Column(name = "PARSECTIONEDDOCTORID")
    public Long getParSectionedDoctorid() {
        return parSectionedDoctorid;
    }

    public void setParSectionedDoctorid(Long parSectionedDoctorid) {
        this.parSectionedDoctorid = parSectionedDoctorid;
    }

    @Basic
    @Column(name = "PARSECTIONEDDOCTOR")
    public String getParSectionedDoctor() {
        return parSectionedDoctor;
    }

    public void setParSectionedDoctor(String parSectionedDoctor) {
        this.parSectionedDoctor = parSectionedDoctor;
    }

    @Basic
    @Column(name = "PARSECTIONEDTIME")
    public Date getParSectionedTime() {
        return parSectionedTime;
    }

    public void setParSectionedTime(Date parSectionedTime) {
        this.parSectionedTime = parSectionedTime;
    }

    @Basic
    @Column(name = "PARISPRINTLABEL")
    public Long getParisprintlabel() {
        return parisprintlabel;
    }

    public void setParisprintlabel(Long parisprintlabel) {
        this.parisprintlabel = parisprintlabel;
    }

    @Basic
    @Column(name = "PARPRINTUSERID")
    public Long getParPrintUserId() {
        return parPrintUserId;
    }

    public void setParPrintUserId(Long parPrintUserId) {
        this.parPrintUserId = parPrintUserId;
    }

    @Basic
    @Column(name = "PARPRINTUSER")
    public String getParPrintUser() {
        return parPrintUser;
    }

    public void setParPrintUser(String parPrintUser) {
        this.parPrintUser = parPrintUser;
    }

    @Basic
    @Column(name = "PARPRINTTIME")
    public Date getParPrintTime() {
        return parPrintTime;
    }

    public void setParPrintTime(Date parPrintTime) {
        this.parPrintTime = parPrintTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PimsPathologyParaffin that = (PimsPathologyParaffin) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(parSampleId, that.parSampleId) &&
                Objects.equals(parPathologyCode, that.parPathologyCode) &&
                Objects.equals(parPieceid, that.parPieceid) &&
                Objects.equals(parName, that.parName) &&
                Objects.equals(parParaffinNo, that.parParaffinNo) &&
                Objects.equals(parParaffinCode, that.parParaffinCode) &&
                Objects.equals(parpPeceCount, that.parpPeceCount) &&
                Objects.equals(parNullSlideNum, that.parNullSlideNum) &&
                Objects.equals(parPieceParts, that.parPieceParts) &&
                Objects.equals(parIsSectioned, that.parIsSectioned) &&
                Objects.equals(parSectionedDoctorid, that.parSectionedDoctorid) &&
                Objects.equals(parSectionedDoctor, that.parSectionedDoctor) &&
                Objects.equals(parSectionedTime, that.parSectionedTime) &&
                Objects.equals(parisprintlabel, that.parisprintlabel) &&
                Objects.equals(parPrintUserId, that.parPrintUserId) &&
                Objects.equals(parPrintUser, that.parPrintUser) &&
                Objects.equals(parPrintTime, that.parPrintTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, parSampleId, parPathologyCode, parPieceid, parName, parParaffinNo, parParaffinCode, parpPeceCount, parNullSlideNum, parPieceParts, parIsSectioned, parSectionedDoctorid, parSectionedDoctor, parSectionedTime, parisprintlabel, parPrintUserId, parPrintUser, parPrintTime);
    }
}
